﻿using System.ComponentModel;
using System.Globalization;

namespace InputBoxes.Controls
{
    [ToolboxItem(true)]
    public class DecimalInputBox : NumericValueTypeInputBoxBase<decimal>
    {
        protected override decimal? Parse(string text)
        {
            decimal value;
            return decimal.TryParse(text, NumberStyles, CultureInfo.CurrentUICulture, out value) ? (decimal?)value : null;
        }
    }
}